package com.vini.core.ec;


import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "circles", catalog = "hopon")
public class Circles implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	
	private int circleId;
	private String name;
	private String description;
	private Date dateOfCreation;
	private Character autoEnrollYn;
	private String affiliations;
	private User circleOwner;
	private User creator;

	public Circles() {
	}

	public Circles(int circleId) {
		this.circleId = circleId;
	}

	public Circles(int circleId, String name, String description,
			Date dateOfCreation, User circleOwner,
			Character autoEnrollYn, String affiliations) {
		this.circleId = circleId;
		this.name = name;
		this.description = description;
		this.dateOfCreation = dateOfCreation;
		this.circleOwner = circleOwner;
		this.autoEnrollYn = autoEnrollYn;
		this.affiliations = affiliations;
	}

	@Id
	@Column(name = "Circle_Id", unique = true, nullable = false)
	public int getCircleId() {
		return this.circleId;
	}

	public void setCircleId(int circleId) {
		this.circleId = circleId;
	}

	@Column(name = "Name", length = 45)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "Description", length = 100)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "Date_of_creation", length = 10)
	public Date getDateOfCreation() {
		return this.dateOfCreation;
	}

	public void setDateOfCreation(Date dateOfCreation) {
		this.dateOfCreation = dateOfCreation;
	}

	
	@Column(name = "AutoEnroll_YN", length = 1)
	public Character getAutoEnrollYn() {
		return this.autoEnrollYn;
	}

	public void setAutoEnrollYn(Character autoEnrollYn) {
		this.autoEnrollYn = autoEnrollYn;
	}

	@Column(name = "Affiliations")
	public String getAffiliations() {
		return this.affiliations;
	}

	public void setAffiliations(String affiliations) {
		this.affiliations = affiliations;
	}

	@ManyToOne(cascade = CascadeType.ALL)
	public User getCircleOwner() {
		return circleOwner;
	}

	public void setCircleOwner(User circleOwner) {
		this.circleOwner = circleOwner;
	}
	@ManyToOne(cascade = CascadeType.ALL)
	public User getCreator() {
		return creator;
	}

	public void setCreator(User creator) {
		this.creator = creator;
	}

}
